GET /api/admin/learn/sections
List of Sections

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 3,
    "title": "Establishing Brand Guidelines",
    "lessons": [
      {
        "id": 2,
        "title": "Brand Heart",
        "description": null
      },
      ...
    ],
    "quizzes": [
      {
        "id": 1,
        "title": "Quiz 1"
      },
      ...
    ]
  },
  ...
]

GET /api/admin/learn/courses/:course_id/sections/:id
Section Info

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "id": 3,
  "title": "Establishing Brand Guidelines",
  "lessons": [
    {
      "id": 2,
      "title": "Brand Heart",
      "description": null
    },
    ...
  ],
  "quizzes": [
    {
      "id": 1,
      "title": "Quiz 1"
    },
    ...
  ]
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer


POST /api/admin/learn/courses/:course_id/sections
Create Section

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  section: {
    title: "Establishing Brand Guidelines"
  }
}

Success response body

{
  "id": 2,
  "title": "Establishing Brand Guidelines"
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

section
required

Validations:

  • Must be a Hash

section[title]
required

Validations:

  • Must be a String

section[position]
required

Validations:

  • Must be a Integer


PUT /api/admin/learn/courses/:course_id/sections/:id
Update Section

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  section: {
    title: "Brand Guidelines"
  }
}

Success response body

{
  "id": 2,
  "title": "Brand Guidelines"
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer

section
required

Validations:

  • Must be a Hash

section[title]
required

Validations:

  • Must be a String

section[position]
required

Validations:

  • Must be a Integer


DELETE /api/admin/learn/courses/:course_id/sections/:id
Destroy Section

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  "success": true
}

Params

Param name Description
course_id
required

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be a Integer